package com.bingfor.easycablelink.widgets;

import android.app.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;

import com.bingfor.easycablelink.R;
import com.bingfor.easycablelink.base.BaseActivity;
import com.bingfor.easycablelink.databinding.DialogExitBinding;
import com.bingfor.easycablelink.utils.ToastUtil;

public class ExitDialog extends Activity {

    DialogExitBinding binding;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DialogExitBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        getWindow().setLayout(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT);
        initView();
    }

    private void initView(){
        binding.tvCancel.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        binding.tvFix.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtil.showToast("确认");
                finish();
            }
        });
    }
}
